;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
;;; Copyright © 2022 florhizome <florhizome@posteo.de>
;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages guile)
  #:use-module (guix build-system gnu)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages version-control))

(define-public tekuti
  (package
    (name "tekuti")
    (version "0.0.1")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/wingo/tekuti")
          (commit "master")))
       (sha256
        (base32
         "0gkwc4zxsfkmwxxgrvh6qpd18apxmgfcak90bq13xsl4a38nd4gk"))))
    (build-system gnu-build-system)
    (native-inputs
     (list guile-next pkg-config automake autoconf libtool))
    (inputs
     (list guile-next))
    (propagated-inputs (list git))
    (arguments
     `(#:make-flags '("GUILE_AUTO_COMPILE=0")
       #:phases
       (modify-phases %standard-phases
         (add-before 'bootstrap 'no-autocomp
           (lambda _
             (setenv "GUILE_AUTO_COMPILE" "0"))))))
    (synopsis "Server-side blog engine written in Scheme")
    (description "Tekuti is a simple functional blogging engine based on git and sxml, used by guile's maintainer Andy Wingo on his blog.")
    (home-page "https://github.com/wingo/tekuti")
    (license license:gpl3+)))

(define-public guilescript
  (package
    (name "guilescript")
    (version "0.2.0")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/aconchillo/guilescript")
          (commit (string-append "v" version))))
       (sha256
        (base32
         "15bvgklv77kvkl8dizriqblfir6rid5nm79ymi3m2fvpd7wf77qy"))))
    (build-system gnu-build-system)
    (native-inputs
     (list guile-3.0 pkg-config automake autoconf libtool))
    (inputs
     (list guile-3.0-latest))
    (arguments
     `(#:make-flags '("GUILE_AUTO_COMPILE=0")))
    (synopsis "Compile Guile to Javascript, similar to Clojurescript")
    (description "")
    (home-page "https://github.com/aconchillo/guilescript")
    (license license:gpl3+)))
